// alert("hello world2")

// == 和 === 的区别
let s1 = "123"
let n1 = 123
// == 内容是否相等
console.log(s1 == n1); // true
// === 先判断类型是否一致，类型一致，再判断内容
console.log(s1 === n1);// false

let today = 6
switch (today) {
    // case 1 -> {}
    case 1:
        console.log("星期一");

    // case 1:
    //     console.log("星期一");
    //     break;
    case 2:
        console.log("星期二");
        break;
    case 3:
        console.log("星期三");
        break;
    case 4:
        console.log("星期四");
        break;
    case 5:
        console.log("星期五");
        break;
    case 6:
        console.log("星期六");
        break;
    default:
        console.log("周末");
        break;
}


// 输出99乘法表
for (let i = 1; i <= 9; i++) {
    let str = "";
    for (let j = 1; j <= i; j++) {
        str += (i + "*" + j + "=" + i * j) + "\t"
    }
    console.log(str);
}

// 1-100的和
let result = 0;
for (let i = 1; i <= 100; i++) {
    result += i;
}
console.log(result);
// 对象.属性 属性是自己自定义
let person = new Object()
person.name = "kaifamiao"
person.age = 10
person.birth = "2013-01-01"
person.id = 1
person.hobby = "唱跳"
// 获取对象的值 对象.属性 对象['属性名']
console.log(person.name);
console.log(person['birth']);
// 属性和属性之间使用逗号隔开
let p2 = {
    name: "肖战",
    age: 30,
    birth: '1993-01-01',
    id: 2,
    hobby: "陈情令"
}
p2.gender = "男"
console.log(p2);


